const Koa = require('koa');
const json  = require('koa-json');
const InitManager = require('./server/core/init')
const logger = require('koa-logger');
const cors = require('@koa/cors')
const bodyparser = require('koa-bodyparser');

const catchError = require('./server/middlewares/exception')

const app = new Koa();

app.use(cors())
app.use(catchError)
app.use(bodyparser())
app.use(json());
InitManager.initCore(app)
app.use(logger())


app.listen(3000,()=>{
    console.log('the project is running test node');
})